<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>

<head>
    <title></title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!--<link rel="stylesheet" href="/cp/Public//css/public.css">-->

    <!-- Bootstrap -->
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
    <!--<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>-->
    <script src="https://code.jquery.com/jquery-1.12.4.js"></script>


    <!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
    <!--<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>-->
    <script type="text/javascript" src="/cp/Public//js/common.js"></script>
    <script type="text/javascript" src="/cp/Public//js/d3.min.js"></script>

    <!--日期控件-->
    <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
    <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
    <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>



    <style type="text/css" media="screen">
        body {
            padding-top: 20px;
            padding-left: 50px;
            padding-right: 50px;
        }
    </style>

    <script type="text/javascript">
        $(function () {

            $("#datepicker-start").datepicker({
                dateFormat: 'yy-mm-dd',
                showButtonPanel: true,

            });

        })


    </script>
</head>

<body>
<!--<a type="button" value="新增渠道" class="btn btn-default" href="<?php echo U('channel/add_',array('product'=>$product));?>" >新增渠道</a>-->
    <table class="table table-bordered table-hover definewidth m10">
        <thead>
            <tr>
                <th>公司名称</th>
                <th>渠道号</th>
                <th>产品</th>
                <th>铃音id</th>
                <th>整曲id</th>
                <th>同步地址</th>
                <th>模拟同步</th>
                <th>操作<?php echo ($product); ?></th>
            </tr>
        </thead>
        <tbody>
            <?php if(is_array($data)): foreach($data as $key=>$vo): ?><tr>
                    <td><?php echo ($vo["name"]); ?></td>
                    <td><?php echo ($vo["id"]); ?></td>
                    <th>
                        <?php switch($vo["product"]): case "1": ?>挖哇<?php break;?>
                            <?php case "2": ?>余音<?php break;?>
                            <?php case "3": ?>挖哇铃音盒<?php break;?>
                            <?php default: ?>default<?php endswitch;?>
                    </th>
                    <td><?php echo ($vo["track_id"]); ?></td>
                    <td><?php echo ($vo["content_id"]); ?></td>
                    <td><?php echo ($vo["sync_url"]); ?></td>
                    <td><a href="<?php echo U('channel/send_',array('id'=>$vo[id],'product'=>$product));?>">模拟同步</a></td>
                    <td><a href="<?php echo U('channel/edit_',array('id'=>$vo[id],'product'=>$product));?>">编辑</a></td>
                </tr><?php endforeach; endif; ?>
        </tbody>
    </table>
    <?php echo ($page); ?>
</body>

</html>
<script>
$(function() {

    $('#addnew').click(function() {

        window.location.href = "<?php echo U('channel/add_');?>";
    });


});

function del(id) {


    if (confirm("确定要删除吗？")) {

        var url = "index.html";

        window.location.href = url;

    }




}
</script>